'use strict';

import canonicalProperties from '../unicode-canonical-property-names-ecmascript/index.js';
import propertyAliases from '../unicode-property-aliases-ecmascript/index.js';

export const matchProperty = function(property) {
	if (canonicalProperties.has(property)) {
		return property;
	}
	if (propertyAliases.has(property)) {
		return propertyAliases.get(property);
	}
	throw new Error(`Unknown property: ${ property }`);
};

export default matchProperty;
